<?php

/**
 * @author Murat Cem YALIN <muratcem@gmail.com>
 * @copyright 2014 muratcem.com - walkerPHP.com
 * @license http://opensource.org/licenses/GPL-3.0 GNU General Public License, version 3
 * @version 1.0.1
 */

namespace core\ViewLoader;

interface IView{
    /**
     * function to set variables that are used in view files
     *
     * @param string|array $keyword
     * @param string $value
     * @return $this
     */
    public function with($keyword, $value='');

    /**
     * function to change Array() with a list format
     *
     * @param string $keyword
     * @param array $array
     * @param string $rowFormatTemplate view name or row format string
     * @return $this
     */
    public function withList($keyword, Array $array, $rowFormatTemplate = '');

    /**
     * render view and get result
     * @return string
     */
    public function getContent();

    /**
     * render view and write result
     * @return void
     */
    public function writeContent();
}